Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Shovels: support old and new supervisor child ID formats on 3.11.x #10080

Merged
merged 7 commits into from
Dec 8, 2023

Conversation

gomoripeti
Copy link
Contributor

Proposed Changes

v3.11.25 contains a backport of a change that modified the supervisor child ids of dynamic shovel workers.

This is a backport of #9919, #9965 and #9968 to v3.11.x from 3.12.x that together fixed the situation.

An alternative would be to just revert the id format to the old one and somehow "withdraw" versions 3.11.25 and 3.11.26 (or say that it is not possible to upgrade to 3.12.0..3.12.7 from those versions)

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

Put an x in the boxes that apply.
You can also fill these out after creating the PR.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

Further Comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc.

michaelklishin and others added 7 commits December 8, 2023 18:14
During a rolling upgrade, all cluster nodes collectively
may (and usually will, due to Shovel migration during node restarts)
contain mirrored_supervisor children with IDs that use two different
parameters (see referenced commits below).

The old format should not trip up node startup, so new
nodes must accept it in a few places, and try to use
these older values during dynamic Shovel spec cleanup.

References ccc22cb, 5f0981c, rabbitmq#9785.

See rabbitmq#9894.

(cherry picked from commit 2ce0307)

# Conflicts:
#	deps/rabbitmq_shovel/src/rabbit_shovel_dyn_worker_sup_sup.erl
So that they do not make it to Khepri.

(cherry picked from commit 28741cd)
Before 3.13.0, 3.12.8 and 3.11.25 supervisor id format was different. Don't
start a shovel with the new id format if one exists with the old id
format.
Because the clause `({{_, N}, _, _, _}) -> N =:= Name;` matches both
new and old id format but always returns false for old id format,
`child_exists` also returned false for old ids.

Also rename SupId to ChildId to be pedantically correct.
@gomoripeti gomoripeti mentioned this pull request Dec 8, 2023
12 tasks
@michaelklishin michaelklishin merged commit da8b299 into rabbitmq:v3.11.x Dec 8, 2023
8 of 9 checks passed
@michaelklishin michaelklishin added this to the 3.11.27 milestone Dec 8, 2023
@gomoripeti gomoripeti deleted the fix_shovel_3_11 branch February 12, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants